<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>动态绑定属性值</title>
</head>

<body>
  <div id="root">
    <!-- vue动态绑定属性方法 -->
    <a v-bind:href="url">百度一下</a>
    <!-- 动态绑定 简写 -->
    <a :href="url">百度一下</a>
    <hr>
    <!-- v-bind绑定就是在vue对象中动态数据 绑定数据的引入号，就是一个js环境 -->
    <img :src="src" alt="">
    <hr>
    <img :src="'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1376934670,3210146191&fm=26&gp=0.jpg'" alt="">
  </div>

  <script src="./lib/vue.js"></script>
  <script>
    new Vue({
      el: '#root',
      data: {
        url: 'http://www.baidu.com',
        src:'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=710445438,3189748472&fm=26&gp=0.jpg'

      }
    })
  </script>
</body>

</html>